{% extends "base.html" %}

{% block main %}

	{% if subtitle %}<h2>{{ subtitle }}</h2>{% endif %}
	
	<!-- pagemarks start -->
	{% if pagemarks %}
	<div class='pagemarks'>
	{% for mark in pagemarks %}
	{% if mark.is_link %}
	<a href='{{ mark.url }}' class='{{ mark.css }}'>{{ mark.label }}</a>
	{% else %}
	<span class='{{ mark.css }}'>{{ mark.label }}</span>
	{% endif %}
	{% endfor %}
	</div>
	{% endif %}
	<!-- pagemarks end -->

	{% if comments %}
	<table class='list'>
	{% for c in comments %}
	<tr>
		<td>{{ c.author }}: </td>
		<td>
			<a href='/p/{{ c.postid }}/#comments'>{{ c.content|truncate(length=30,killwords=True,end='...') }}</a>
			<span class='date'>{{ c.createdate_dt|datetimeformat('%Y/%m/%d %H:%M') }}</span>
		</td>
	</tr>
	{% endfor %}
	</table>
	{% else %}
		<p>没有评论。</p>
	{% endif %}
	
	<!-- pagemarks start -->
	{% if pagemarks %}
	<div class='pagemarks'>
	{% for mark in pagemarks %}
	{% if mark.is_link %}
	<a href='{{ mark.url }}' class='{{ mark.css }}'>{{ mark.label }}</a>
	{% else %}
	<span class='{{ mark.css }}'>{{ mark.label }}</span>
	{% endif %}
	{% endfor %}
	</div>
	{% endif %}
	<!-- pagemarks end -->
	
	
	
{% endblock %}

{% block sidebar %}
	
{% endblock %}


